/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package smartgrid;

import org.hibernate.Criteria;
import org.orm.PersistentException;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class SupplierCriteria extends AbstractORMCriteria {
	public final IntegerExpression ID;
	public final StringExpression Name;
	public final StringExpression Country;
	
	public SupplierCriteria(Criteria criteria) {
		super(criteria);
		ID = new IntegerExpression("ID", this);
		Name = new StringExpression("Name", this);
		Country = new StringExpression("Country", this);
	}
	
	public SupplierCriteria(PersistentSession session) {
		this(session.createCriteria(Supplier.class));
	}
	
	public SupplierCriteria() throws PersistentException {
		this(smartgrid.SmartgridPersistentManager.instance().getSession());
	}
	
	public TariffCriteria createTariff_Tariff_roleCriteria() {
		return new TariffCriteria(createCriteria("ORM_Tariff_Tariff_role"));
	}
	
	public Supplier uniqueSupplier() {
		return (Supplier) super.uniqueResult();
	}
	
	public Supplier[] listSupplier() {
		java.util.List list = super.list();
		return (Supplier[]) list.toArray(new Supplier[list.size()]);
	}
}

